---
title: GCP
---

This section provides a guide on deploying ParadeDB to a Google Cloud Platform (GCP) Compute Engine instance. Before proceeding, ensure that you have a Google Cloud account and optionally the gcloud SDK installed.

# Step-by-Step Guide

## Launching a GCP Compute Engine Instance

**Instance Type**

The best setup can vary depending on your application use case, but we recommend balanced machines, like the `n2` family. For testing out a `e2-standard` or similar will suffice.

**Storage**

We recommend you add storage to your instance using Persistent Disks. Generally, for indexing and search its recommended to use fast SSD storage. For starting
out, general purpose storage will serve fine. However, if you are looking for a more performant setup, you can use performance-optimized disks like `pd-ssd`. The instance
needs at least 16GB of storage to install ParadeDB, in addition to any amount of storage you expect to store within your PostgreSQL database.

**Image**

You can use any OS image, as long as you can install Docker and Docker-compose to it. We recommend using the latest Ubuntu LTS AMI.

After you have selected the right instance for your needs, launch the instance either via the GCP Console's "Create Instance" button or use the gcloud SDK.

**Networking**

Configure firewall rules on the GCP console or CLI to allow TCP traffic to the port where ParadeDB will be exposed, by default 5432.

## Installing ParadeDB

**Step 1: Connect to the Instance**

From your terminal or command prompt, use the gcloud SDK to SSH into the instance:

```bash
gcloud compute ssh --project=YOUR_PROJECT_ID --zone=YOUR_ZONE YOUR_INSTANCE_NAME
```

**Step 2: Install Docker Engine on the Instance**

The instructions below assume you are on a Debian-based image. If you picked a different OS image, you will need to use the appropriate package manager (i.e. yum, etc.).
Update the installed packages and add the Docker repository:

```bash
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common gnupg

# Add Docker's official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# Set up the Docker repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
```

Install Docker:

```bash
sudo apt-get install docker-ce docker-ce-cli containerd.io
```

Allow Docker to be used without root:

```bash
sudo groupadd docker
sudo usermod -aG docker $USER

# Activate changes on groups
newgrp docker
```

<Note>
  It's recommended to log out and log back in for group changes to take effect.
</Note>

**Step 3: Run the ParadeDB image**

Pull and run the ParadeDB Docker image:

```bash
docker run \
  -d \
  -e POSTGRES_USER=<user> \
  -e POSTGRES_PASSWORD=<password> \
  -e POSTGRES_DB=<dbname> \
  -p 5432:5432 \
  -d \
  paradedb/paradedb:latest
```

Test the PostgreSQL server connection:

```bash
psql postgresql://your-user:your-password@your-instance-ip:5432/your-db
```

Ensure that your instance's firewall rules allow connections on the port where PostgreSQL is running.

That's it! You can now connect to your ParadeDB instance and start writing queries.
